/* 	Visitor.java
	From: Department of CSE
	Authors: Le Minh Vu, Nguyen Hua Phung
	Date: 15/11/2007
*/

package MP.ASTs;
import MP.CompilationException;


public interface Visitor {

  // Programs
  public abstract Object visitProgramAST(ProgramAST ast, Object o) throws CompilationException;

  // Variable/constant declaration
  public abstract Object visitVarDeclPartAST(VarDeclPartAST ast, Object o) throws CompilationException;
  public abstract Object visitVarDeclAST(OneDeclAST ast, Object o) throws CompilationException;
  public abstract Object visitConstDeclAST(OneDeclAST ast, Object o) throws CompilationException;
  public abstract Object visitEmptyVarDeclPartAST(EmptyVarDeclPartAST ast, Object o) throws CompilationException;

  // Type
  public abstract Object visitIntTypeAST(IntTypeAST ast, Object o) throws CompilationException;
  public abstract Object visitRealTypeAST(RealTypeAST  ast, Object o) throws CompilationException;
  public abstract Object visitBoolTypeAST(BoolTypeAST ast, Object o) throws CompilationException;
  public abstract Object visitArrayTypeAST(ArrayTypeAST ast, Object o) throws CompilationException;

  // Const
  public abstract Object visitIntLiteralAST(IntLiteralAST ast, Object o) throws CompilationException;
  public abstract Object visitRealLiteralAST(RealLiteralAST ast, Object o) throws CompilationException;
  public abstract Object visitStringLiteralAST(StringLiteralAST ast, Object o) throws CompilationException;
  public abstract Object visitBoolLiteralAST(BoolLiteralAST ast, Object o) throws CompilationException;

  // Procedure/function declaration
  public abstract Object visitProDeclPartAST(ProDeclPartAST ast, Object o) throws CompilationException;
  public abstract Object visitEmptyProDeclPartAST(EmptyProDeclPartAST ast, Object o) throws CompilationException;
  public abstract Object visitProcDeclAST (ProcDeclAST  ast, Object o) throws CompilationException;
  public abstract Object visitFuncDeclAST (FuncDeclAST  ast, Object o) throws CompilationException;
  public abstract Object visitParaListAST (ParaListAST  ast, Object o) throws CompilationException;
  public abstract Object visitEmptyParaListAST(EmptyParaListAST  ast, Object o) throws CompilationException;

  // statement
  public abstract Object visitStmtListAST(StmtListAST ast, Object o) throws CompilationException;
  public abstract Object visitEmptyStmtListAST(EmptyStmtListAST ast, Object o) throws CompilationException;
  public abstract Object visitCompStatAST(CompStatAST ast, Object o) throws CompilationException;
  public abstract Object visitAssiStmtAST(AssiStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitForStmtAST(ForStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitIfThenStmtAST(IfThenStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitIfThenElseStmtAST(IfThenElseStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitRepeatStmtAST(RepeatStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitWhileStmtAST(WhileStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitBreakStmtAST(BreakStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitContStmtAST(ContStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitRetNullStmtAST(RetNullStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitRetStmtAST(RetStmtAST ast, Object o) throws CompilationException;
  public abstract Object visitCallStmtAST(CallStmtAST ast, Object o) throws CompilationException;

  // expression
  public abstract Object visitBinExprAST(BinExprAST ast, Object o) throws CompilationException;
  public abstract Object visitUnaryExprAST(UnaryExprAST ast, Object o) throws CompilationException;
  public abstract Object visitVarExprAST(VarExprAST ast, Object o) throws CompilationException;
  public abstract Object visitEleExprAST(EleExprAST ast, Object o) throws CompilationException;
  public abstract Object visitCallExprAST(CallExprAST ast, Object o) throws CompilationException;
  public abstract Object visitExprListAST(ExprListAST ast, Object o) throws CompilationException;
  public abstract Object visitEmptyExprListAST(EmptyExprListAST ast, Object o) throws CompilationException;
  public abstract Object visitCastInt2RealAST(CastInt2RealAST ast, Object o) throws CompilationException; 
  
  //Lvalue
  public abstract Object visitLvalueAST(LvalueAST ast, Object o) throws CompilationException;
}
  
